package com.peng.sell.exception;

import com.peng.sell.enums.ResponseCodeEnum;
import lombok.Data;

@Data
public class SellException extends RuntimeException {
    private int code;
    public SellException(ResponseCodeEnum responseCodeEnum) {
        super(responseCodeEnum.getDesc());
        this.code = responseCodeEnum.getCode();
    }

    public SellException( int code,String message) {
        super(message);
        this.code = code;
    }
}
